Raise TypeError instead of AssertionError
Removed all asserts from modeling and raise errors instead
fixed test failure
Change some TypeError to ValueError
Removing unnecessary lines
Merge pull request #2390 from bsipocz/fix_asserts_to_raise_error_in_modelling

Change assert statements to raise error in modelling code