Preventing NPE if cast button does not exist