adding a currentType method to get current source type if known

Alternative solution for the problem posed in #1313. See that PR for discussion.