Defensive programming FTW!