modified isPrivate validation method