fixed bug where inspect would crash on undefined input
updated tests