Update getDataTypeName and corresponding functions to offer a fallback if run in test environment.
This was necessary to make many unit test pass since the test db has no seed
values.