Handle null values in a better way.