fixup get_param to properly check type