We need to test that there are no negative values before performing log-scale transform. Otherwise the program crashes.