added error check for output type in get_all