Add some safety checks