This also should have a comment explaining why this check works.

Aslso I wonder if we should checking ```is_array()``` on the result instead of comparing against null - It would be a touch more accurate.