extendedDecodeValue added for easy extending the support of different types