[r] How to check if object (variable) is defined in R?