Adding some type detection to operator() template