Check for null value instead of empty value