handle nulls better