In general, Julia is much more picky about what types of things can be used in if statements and && or || conditions than Matlab is. They must be Bools in Julia, whereas Matlab tries to convert things to a scalar logical value.
Also note that braces don't denote scope, but rather create Any-typed arrays. You don't want to be using them within your if blocks.