n_distinct treats NA correctly. closes #384