to_int_or_zero
Converts given value to an integer or returns 0 if it fails.
Function taken from misc
misc
value – arbitrary data type.
int