Safe casting functions

These assertions might make more sense under the "shouldn't pass" section since we no longer truncate.