Added null check for region when trying to get region span, added
"throws" modifier to the same method definition.