error message now appears if result from api is nil or empty