check for some variables to not be empty

also some beauty change with tabs/spaces for indentation