.compact() and .expand() now work with null and undefineded values