Added type predicate and its UnmarshalJSON method