Fix crash when scala reflection compiler hits an Assert

This makes the CodeSheet more flexible in accepting all kinds of input.