Separate assignment from check

This fixes the issue that the argument was always ignored because of
lazy checking.