Catch ValueError when thrown by JSON decoder