Adds a generic method to register a command type callback.