added is.null check for arguments passed into ufun_atta