Added missing asserts and function arguments checks.
Merge branch 'list_asserts' into devel