move convertType to phpcr-utils