Merge this with the previous block if possible - you are repeating checks here