Changed the BaseLookup code to support any data type.