Update sh_createitems.lua

Added an IsValid check when entities are spawned. Previously, the error 'attempt to index field 'dt' (a nil value)' was shown, which has got me (and others) stuck a few times.