Fix certain crashes when invalid values are passed in an callback