Clearing build warnings

Pattern matches against invalid input explicitly throw