Added a few missing argument/parameter checks

Signed-off-by: IUnknown68 <arne@salsitasoft.com>