fixing bad null checks that were caused by the sample-{ram,disk} refactoring