Removed double is_array check