Add type asserts to ensure retrieved objects are in fact the right type