Cherrypicked bcc4140 (Don't convert None to int)