function to shorten null/undef validation for ceylon/ceylon-js#322