Instead of repeating this logic, can it be moved to your PDataTypeForArray class as
boolean isCoercibleTo(PDataType sourceType, PDataType targetType, Object value);