Input Optical Isolation -- Yes I'm a little new..

Looks fine, make sure internal pullups are enabled, test for a low to see if switch is closed.