The function is `safe_as_int` without underscore.

Also, why do we use a separate file for that and not just put it in utils?