Converted nil check to !hasValue