Add getFirstWord method
Check for command type