added checks to=null and for getPieceAt(to)!=null

and corresponding tests.
Merge branch 'master' of https://github.com/kristenbrann/hanto into Hanto_TCA_KLB