Add null check to service lookup