Added null check to service parameter check