No heater should be left on overnight without proper precautions, but some types of heaters are generally considered safer than others.
Electric heaters with an automatic shut-off feature are designed to automatically turn off when they reach a certain temperature or go above it.