no need to check is_array twice