fixing class cast when --secret-file is not present

KNIFE-476 introduced an error that occurs when a secret file is not present. This PR fixes it.