[DB-6677] GetValue should enforce the requested data type