Walker class doesn't exist, stop execution

Added in a if statement to check if walker class exists. This check was put in place to stop these classes fatal erring when using WP-CLI.