debugging mkNull.R