comparison fix for null/undefined values