Check signature first before trying to decode JSON