fix 500 on bad thread id input

This happens if the input is not a valid ObjectID--if you chop off one letter so there are an odd number of hex digits (hexits?), or if there are other characters