Handle None when it is passed to casts