improved isJson() with heavy regex