Adding GetType command and fixing a non-initialized issue
get type mask