handle null values like undefined