check for definedness and use default values...

... to avoid unitialized warnings