Only check the last JSON error if the function for it exists