use validate instead of is.null