TypeError thrown

array_keys(): Argument #1 ($array) must be of type array, WP_Hook given