Use assert() and errors instead of if-statements and continuing with bad data