null check on id