Explicitly convert doesLocalPageExist's return value

It seems that return values have to be explicitly converted to
boolean when interacting with Java. Otherwise, a
NullPointerException is thrown.