BUG: Type was not being defaulted to None

If the value was an empty string the value was not being defaulted to
None, hence causing some problems.
TST: Fix tests for test_getitem