Added a validation if json is empty