updated to add some validation where we cannot take nulls