Fix implementation of std_print

And make prints robust to msg being None

Signed-off-by: Stefan Marr <git@stefan-marr.de>