Consider using empty() to check for an empty array, I am of the impression that it does not need to perform the work needed to discover the count to only determine if the array is empty and should be a faster result.
To demonstrate in your scenario ( including the array check, though you should trust it as an array as you're strictly defining it as one but I can understand you are just providing an example and it might be from an unknown source )
$a = [];
if (is_array($a)) {
  die(empty($a) ? 'empty' : 'not empty');
} else {
  die('Not an array');
}