More sanity checks on exotic devices args
Make this strtoul call more robust