nil comparison refinement