From StackOverflow: http://stackoverflow.com/a/11836108/1365289
if (extension != "jpg" &&
extension != "gif" &&
extension != "bmp" &&
extension != "png" &&
extension != "whatever else") {
// This will execute when the extension is NOT one of the expected
// extensions.
}