Fixing JSON check