use direct result of switch type assertion
Merge pull request #81 from satoshun/type_assertion

use direct result of switch type assertion