Changed to check if camera instanceof, instead of comparing the type string