Checking the type of the input when logging, fixes #5