use null comparison instead of empty()