issue-6: Replaced optional unwrapping with safer version using '?' to pr...

...event runtime exceptions.