Additional null checks and tests for Expressions.literals()