Determines whether a given command is available or not. Optionally loads any required modules.