Always code for the impossible case! The impossible tends to happen surprisingly often. The programming language is irrelevant. Whether you code in C, C++, F#, ColdFusion, PHP, JavaScript, or whatever, conditional statements and case statements should always accommodate the unexpected value.
Right now I am dealing with some code that involves a list of 1 or more items. The actionable part of the code involves clicking on one of the items in the list therefore at least 1 item must exist. Having zero items is impossible because if there were no items then I could not click on the item to start the actionable part of the code. So why waste time coding of the zero items case? This is not the best example since this is a multi-user, client/server web application and the zero case can be created quite simply by having two users pull up the same list and then one user deletes an item before the other. But that answers the question of why waste time coding for the impossible? Because it does happen. My code frequently has conditional statements that end with a default case or a special case that simply outputs "This is impossible. Please contact the administrator." and includes some debugging information. In my career, doing this has saved me hours and hours of debugging time on more than a couple of occasions.