Fix for NPE when no json is sent