Evaluates an expression and returns the first non-null value.