Added an empty check to the API value