Custom officers may friendly say “konnichiwa”. But do not be fooled that they are friendly. They are just checking if the subjects (you) understand the basic Japanese. If a non-Japanese are faking as a Japanese they might freeze up. I do often freeze up thinking “Are you talking to me? What’s wrong with you?”. The best way to handle wired comments is just to smile and ignore these phrases.