added more checking for BinaryNumGenerator.java

updated how we get the length of a list, and some if statements if they
hit cancel or enter keywords.