public static function isOfCoercibleType($value, string $type): bool
    {
        if ($type === "mixed") {
            return true;
        }
        $valueType = gettype($value);
        return $valueType === $type
            || ($valueType === "object" && get_class($value) === $type)
            || (self::isNumericType($type) && is_numeric($value))
            || ($type == "string" && is_numeric($value))
            || ($type === "bool" && self::isBooleanValue($value))
            || ($type == "string" && self::isBooleanValue($value));

    }