Fixed the issue with Enum.TryParse, instead using Enum.IsDefined. GetCommand now correctly sets the command type.