my 2nd oneliner which prevents from a type error