It depends; inside code used for simulation yes; inside code to be converted no.
Your code sample is incomplete, but assuming that input_data is a Signal(intbv()[8:]), thus representing a single character you can rewrite your test as:
if input_data >= ord('a') and input_data <= ord('z'):
valid_data.next = input_data
Of course this may get tedious for more complicated cases. In that case you may outsource the check to a function, but if it needs to convert this function would still have to use the above code style.