Fixed S_dup macro for NULL values