Idiomatic ordering with lazyeval


For instance, which of these is the preferred way to check if a value is NULL using NSE (non-standard evaluation):


my_f <- f_capture(my_var)  # let's say my_var comes from another function

# This way?
if (is.null(f_eval(my_f))) {
  # Do something

# Or this way?
if (f_eval(~ is.null(uq(my_f)))) {
  # Do something else

Am I correct in thinking that these two versions are equivalent in all cases? Am I missing some edge cases?

If they are the same, is there a preferred way? I personally find the first version more readable, but I wanted to see if there was anything I hadn't considered.