fixed bounds checking for maxlength a bit; generally constrains values to between the default maxlength and 64, with 0 mapping to default maxlength and None/float('inf') mapping to 64