More safe typecast