Add check function
Merge pull request #4 from r18/master

とりあえずそこそこ簡単な実装