updating rcp null checks to use teuchos function