Added Try...Catch for invalid recipe types