some safety with type expectations and conversions