Added rule prefer guard clause instead using nested conditionals for
flow of control