Added CastOrFree procedure to Utils unit