HATCH: check for NULL pointers and do basic checks.

Signed-off-by: bert <bert.timmerman@xs4all.nl>
HATCH: correction in writing order.

Signed-off-by: bert <bert.timmerman@xs4all.nl>
HATCH: check for NULL pointers and do basic checks.

Signed-off-by: bert <bert.timmerman@xs4all.nl>