catch TypeError on partycalendar.php too