Raise value errors instead of asserts

Since asserts can be silenced using -0 and/or compiled out
we want to be more strict here and raise value errors when the
expected callable objects/functions are not actually callable.

Change-Id: Ib14e2e7329dbfcce50660f144ad4780d99f36854
Merge "Raise value errors instead of asserts"