Don't crash on invalid input