stricter enum typing

helps with debugging, and is just better.

Change-Id: I8364fad374dc0a50a00388219f1b1a911f98e868
Reviewed-by: hjk <hjk121@nokiamail.com>