Check for devices

Simple check for devices.. without it the code crashes in simulator. Can probably be improved.