Add instanceof guard to GuardUtils