Move precondition check.
Merge pull request #48 from alesj/precondition_move

Move precondition check.