fix no method error for to_hash_without_nils