Handle nulls better