Add nil check
Merge pull request #40 from bootstraponline/_elementOrElementsByType

Add nil check