Move null check to update