Error handling of inputs in range and step